<!-- Google dfp -->


var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') + 
'//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();



googletag.cmd.push(function() {

googletag.defineSlot('/11364921/Novo_slider_1', [578, 466], 'div-gpt-ad-1337369837402-0').addService(googletag.pubads());

googletag.defineSlot('/11364921/Novo_slider_2', [578, 466], 'div-gpt-ad-1337370013832-0').addService(googletag.pubads());

googletag.defineSlot('/11364921/Novo_Slider_3', [578, 466], 'div-gpt-ad-1337370083656-0').addService(googletag.pubads());

googletag.defineSlot('/11364921/Novo_Slider_4', [578, 466], 'div-gpt-ad-1337370131099-0').addService(googletag.pubads());

googletag.defineSlot('/11364921/Novo_Slider_5', [578, 466], 'div-gpt-ad-1337370169014-0').addService(googletag.pubads());

googletag.defineSlot('/11364921/Nova_Lateral_1', [165, 225], 'div-gpt-ad-1337726756248-0').addService(googletag.pubads());

googletag.defineSlot('/11364921/Nova_Lateral_2', [165, 225], 'div-gpt-ad-1337727130645-0').addService(googletag.pubads());

googletag.pubads().enableSingleRequest();
googletag.enableServices();
});


<!-- END Google dfp -->

/*Paypal Regulamento*/
$(".payPal__callToAction").click(function(){
	$(".payPal__legal__txt").show();
});
$(".payPal__legal__txt span").click(function(){
        $(".payPal__legal__txt").hide();
});

try{
  if(typeof MOBILE != 'undefined' && MOBILE){
    //Start - Countdown plugin Mobile
    !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m<10&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),Math.abs(b)>1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b<0?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
        //End - Countdown plugin Mobile
  }else{}
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* Start - Setup do countdown */
    if( typeof $.fn.countdown != "undefined"){
          try{
          $('.CountBF26').countdown('2019/12/26 23:59:59', function(event) {
              var totalHours = event.offset.totalDays * 24 + event.offset.hours;
              var totalDays = (Math.floor(totalHours / 24) - 1);
              $(this).html(event.strftime("%H:%M:%S"));
          });
          $('.CountBF27').countdown('2019/11/27 23:59:59', function(event) {
              var totalHours = event.offset.totalDays * 24 + event.offset.hours;
              var totalDays = (Math.floor(totalHours / 24) - 1);
              $(this).html(event.strftime("%H:%M:%S"));
          });
          $('.CountBF0112').countdown('2019/12/26 23:59:59', function(event) {
              var totalHours = event.offset.totalDays * 24 + event.offset.hours;
              var totalDays = (Math.floor(totalHours / 24) - 1);
              $(this).html(event.strftime("%H:%M:%S"));
          });
          $('.CountBF30').countdown('2019/11/30 23:59:59', function(event) {
              var totalHours = event.offset.totalDays * 24 + event.offset.hours;
              var totalDays = (Math.floor(totalHours / 24) - 1);
              $(this).html(event.strftime("%H:%M:%S"));
          });
       
          $('.ofertaRproximaCounter').countdown('2019/11/27 11:30:00', function(event) {
               var totalHours = event.offset.totalDays * 24 + event.offset.hours;
               var totalDays = (Math.floor(totalHours / 24) - 1);
               $(this).html(event.strftime("%H:%M:%S"));
          });
        }catch(e){}
         
    }
    /* End - Setup do countdown */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
}catch(e){}

try {
  //setup countdown
  /*function setCronoSubsAntigo() {
  var today = new Date();
  var weekDay = today.getUTCDay();
  var distance = 0;
  var finalDay = (weekDay >= 0 && weekDay <= 1) ? 1 : (weekDay >= 2 && weekDay <= 4) ? 4 : 6;
  while (weekDay <= finalDay) {
    distance++;
    weekDay++;
  }
  today.setUTCDate(today.getUTCDate() + distance);
  return today;
}*/


  const setCronoSubs = () => {
    let today = new Date();
    let finalDay = (today.getUTCDay() <= 1) ? 1 : (today.getUTCDay() <= 4) ? 4 : 6;
    today.setUTCDate(today.getUTCDate() + (finalDay - today.getUTCDay()) + 1);
    return today;
  }

  var subsCount = setCronoSubs();
  var subsCronoEnd = subsCount.getFullYear() + "/" + (subsCount.getMonth() + 1) + "/" + subsCount.getDate();
  $('.crono-breve').countdown(subsCronoEnd + ' 00:00:00', function (event) {
    var totalHours = event.offset.totalDays * 24 + event.offset.hours;
    $(this).html(event.strftime(totalHours + ':%M:%S'));
  });
} catch (e) {}
//Countdown Include Mobile and Desktop \/


//Countdown Include Mobile and Desktop /\
try{
    if(typeof MOBILE != 'undefined' && MOBILE){
        try{
            $.getScript("https://staticmobly.akamaized.net/cms/marketing/campanha/2018/julho/slick.min.js").done(function(script, textStatus) {
                try{

                    //Slider Ofertas Black
                    $('.slideroOfertasBlack').slick({
                        autoplay: true,
                        autoplaySpeed: 6000,
                        speed: 300,
                        dots: false,arrows: false
                    })
                    
                    $('.voucher-slide').slick({
                      centerPadding: '60px',
                      centerMode: true,
                      autoplay: true,
                      autoplaySpeed: 2000,
                      infinite:false,
                      dots: false,
                      arrows: false,
                      slidesToShow: 1,
                      slidesToScroll: 1
                    });

                }catch(e){}
            });
        }catch(e) {}       
        //Swipe

        $(".catsSwipe__cont").scroll( function() { 
            var st = $(this)[0].scrollWidth - $(this).width();
            if(st <= $(this).scrollLeft()+20){
                $(".catsSwipe__fade").stop();
                $(".catsSwipe__fade").fadeOut(300);
            }else{
                 $(".catsSwipe__fade").stop(); $(".catsSwipe__fade").fadeIn(300);
            }
        });

        $(".catsSwipe__cont").scroll( function() { var st = $(this)[0].scrollWidth - $(this).width(); if(st <= $(this).scrollLeft()+20){ $(".catsSwipe__fade").stop(); $(".catsSwipe__fade").fadeOut(300); }else{ $(".catsSwipe__fade").stop(); $(".catsSwipe__fade").fadeIn(300); }});

        //MOBILE
        //PayPal fadeIn-Out
            if($('.payPal__infom').length != 0) {
                $('.payPal__infom').click(function() { $('.payPal__legalm').fadeIn()});
                $('.payPal__legalm').click(function() { $('.payPal__legalm').fadeOut()});
            }
        //DCM Mobile element Height
              function dcmHeight() { 
                  $('.section-id .dcmads').width('100%'); $('.section-id .dcmads').height($('.dcmads').width()); 
                  $('#ascend-dcm .dcmads').width('100%'); $('#ascend-dcm .dcmads').height(($('.dcmads').width())/1.6); 
              };
              dcmHeight();
              $(window).resize(function() { dcmHeight() });
        //resize mobile sticker WebEngage
        function resizeFooterBanner(){
            var windowSize = screen.width;
            $('#webklipper-publisher-widget-container-notification-frame').height(windowSize * 0.215869017632242);
        }
        resizeFooterBanner();
        $(window).resize(function() { if($('#webklipper-publisher-widget-container-notification-frame').length != 0){ resizeFooterBanner() } });

    }else{ 
        //DESKTOP
        // Slider Call
            $(document).ready(function() {
            //Anchor
            $('a[href*=\\#]').on('click', function(event){ 
              event.preventDefault();
              try{
                var $root = $('html, body');
                $root.animate({
                scrollTop:$(this.hash).offset().top}
                , 500);
              }catch(e){} 
            });
                try{
                    $.getScript("https://staticmobly.akamaized.net/cms/marketing/campanha/2018/julho/slick.min.js").done(function(script, textStatus) {
                        try{
                            $(".sliderSS--topoLoading").fadeOut();
                            $(".slideroOfertasBlack--loading").fadeOut();
                            $(".apostas-loading").fadeOut();
                            $('.sliderSS--topo').slick({
                                lazyLoad: 'ondemand', autoplay: true, autoplaySpeed: 6000, arrows: true, appendArrows: $(".sliderSS__arrow--topo"), prevArrow: $(".sliderSS__prev--topo"), nextArrow: $(".sliderSS__next--topo"), appendDots: $(".sliderSS__dots--topo"), dots: true, draggable: false, fade: true, infinite: true, pauseOnHover: true, pauseOnDotsHover: false, speed: 300, swipe: false, touchMove: false, useTransform: true,
                            });

                            //Slider Ofertas Black
                           $('.slideroOfertasBlack').slick({
                                lazyLoad: 'ondemand',
                                autoplay: true,
                                fade: true,
                                autoplaySpeed: 6000,
                                pauseOnHover: true,
                                speed: 300,
                                dots: false,
                                prevArrow: '<button class="slick-prev" aria-label="Previous" type="button"><i class="icon-caret-left"></i></button>',
                                nextArrow: '<button class="slick-next" aria-label="Next" type="button"><i class="icon-caret-right"></i></button>',
                            })
                            
                            $('.slider_influencers').slick({
                                lazyLoad: 'ondemand',
                                autoplay: true,
                                fade: true,
                                autoplaySpeed: 6000,
                                pauseOnHover: true,
                                speed: 300,
                                dots: false,
                                prevArrow: '<button class="slick-prev" aria-label="Previous" type="button"><i class="icon-caret-left"></i></button>',
                                nextArrow: '<button class="slick-next" aria-label="Next" type="button"><i class="icon-caret-right"></i></button>',
                            })
                            // $('.apostas').slick({ 
                            //     slidesToShow: 4, slidesToScroll: 4, autoplay: true, autoplaySpeed: 6000, arrows: true, appendArrows: $(".apostas-arrows"), prevArrow: $(".apostas-arrows .slick-prev"), nextArrow: $(".apostas-arrows .slick-next"), appendDots: $(".apostas-dots"), dots: true, draggable: false, fade: false, infinite: true, pauseOnHover: true, pauseOnDotsHover: false, speed: 300, swipe: false, touchMove: false, useTransform: true, });

                             $('.perenes--slides').slick({
                                  autoplay: true, autoplaySpeed: 6000, arrows: true, appendArrows: $(".perenes-arrows"), prevArrow: $(".perenes-arrows .slick-prev"), nextArrow: $(".perenes-arrows .slick-next"), draggable: false, fade: false, infinite: true, pauseOnHover: true, pauseOnDotsHover: false, speed: 300, swipe: false, touchMove: false, useTransform: true,
                            });
                            // $('.sliderSS--teste').slick({
                            //     autoplay: true, autoplaySpeed: 6000, arrows: true, appendArrows: $(".sliderSS__arrow--teste"), prevArrow: $(".sliderSS__prev--teste"), nextArrow: $(".sliderSS__next--teste"), appendDots: $(".sliderSS__dots--teste"), dots: true, draggable: false, fade: true, infinite: true, pauseOnHover: true, pauseOnDotsHover: false, speed: 300, swipe: false, touchMove: false, useTransform: true,
                            // });


                        }catch(e){}
                    });
                }catch(e) {}
            });
        // Slider Subs QuickView
            /*try{
                $('.quickViewSku').click(function(event){
                    event.preventDefault();
                    var qvsku = $(this).data("slider-sku");
                    catalog.openQuickView(qvsku);
                });
            }catch(e) {}*/
        //Paypal fadeIn-Out
                if($('.payPal__info').length != 0) {
                    $('.payPal__legal__txt').click(function(e) { $(".payPal__legal__txt").fadeOut() });
                    $('.payPal__callToAction').click(function(e) { $(".payPal__legal__txt").fadeIn() });
                }
        //DCM Desktop Width Resize
            function dcmWidthDesk() { $('.dcmads').width($('.dcmads').parent().width()) };
            dcmWidthDesk();
            $(window).resize(function() { dcmWidthDesk() });
        //Bullet Thumbnail
        try{
            $('.sliderSS--topo').on('init', function (event, slick) {
                $('.sliderSS__dots--topo li').on('mouseover',function(){
                    var i = $(this).index();
                    var esq = ($('.sliderSS__dots--topo li:eq(0)').position().left-102.5) + (i * 20);
                    var img = '<img src='+ $(".sliderSS--topo .slick-slide:eq("+i+") [data-bg]:eq(0)").data("bg") +' width="215"/>';  
                    $('.sliderSS__imgPreview--topo').html(img + '<i class="arrow-down"></i><i class="arrow-down arrowshadow"></i>').css('opacity', 1).css('z-index', 1).css('left', esq)
                }).on('mouseout', function(){$('.sliderSS__imgPreview--topo').css('opacity',0).css('z-index', -1)})   
            });  
            $('.sliderSS--teste').on('init', function (event, slick) {
                $('.sliderSS__dots--teste li').on('mouseover',function(){
                    var i = $(this).index();
                    var esq = ($('.sliderSS__dots--teste li:eq(0)').position().left-102.5) + (i * 20);
                    var img = '<img src='+ $(".sliderSS--teste .slick-slide:eq("+i+") [data-bg]:eq(0)").data("bg") +' width="215"/>';  
                    $('.sliderSS__imgPreview--teste').html(img + '<i class="arrow-down"></i><i class="arrow-down arrowshadow"></i>').css('opacity', 1).css('z-index', 1).css('left', esq)
                }).on('mouseout', function(){$('.sliderSS__imgPreview--teste').css('opacity',0).css('z-index', -1)})   
            });  
            
        }catch(e){}
        //Bullet Timer
        try{
            $(".sliderSS--topo").on('init', function(event, slick){ $('.sliderSS--topo').on('mouseenter',function(){ $(".sliderSS__dots--topo").addClass("sliderMouseHover"); }).on('mouseleave',function(){ $(".sliderSS__dots--topo").removeClass("sliderMouseHover"); }); });

            $(".sliderSS--teste").on('init', function(event, slick){ $('.sliderSS--teste').on('mouseenter',function(){ $(".sliderSS__dots--teste").addClass("sliderMouseHover"); }).on('mouseleave',function(){ $(".sliderSS__dots--teste").removeClass("sliderMouseHover"); }); });
        }catch(e){}
    }
}catch(e){}


try{
  if(typeof MOBILE != 'undefined' && MOBILE){
    //Start - Countdown plugin Mobile
    !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m<10&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),Math.abs(b)>1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b<0?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
        //End - Countdown plugin Mobile
  }else{}
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* Start - Setup do countdown */
    if( typeof $.fn.countdown != "undefined"){
          try{
          /*Cronometro dias e horas*/
          $('.crono-campanha').countdown('2019/12/01 23:59:59', function(event) {
            var totalHours = event.offset.totalDays * 24 + event.offset.hours;
            var totalDays = (Math.floor(totalHours * 24) - 1);
            $(this).html(event.strftime("%D:%H:%M:%S"));
          });
         
          /*Cronometro horas*/
          $('.ofertadodia .cronometro').countdown('2020/01/15 09:59:59', function(event) {
              var totalHours = event.offset.totalDays * 24 + event.offset.hours;
              var totalDays = (Math.floor(totalHours / 24) - 1);
              $(this).html(event.strftime("%H:%M:%S"));
          });
        }catch(e){}
         
    }
    /* End - Setup do countdown */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
}catch(e){}
$(".payPal__callToAction").click(function(){
	$(".payPal__legalm").show();
});
$(".payPal__legal__txt span").click(function(){
  $(".payPal__legalm").hide();
});


//Button texto legal click
      $(".btn-txt-legal").click(function(){
          $(this).toggleClass("--active");
      });


try{
  if(typeof MOBILE != 'undefined' && MOBILE){
    //Start - Countdown plugin Mobile
    !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m<10&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),Math.abs(b)>1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b<0?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
        //End - Countdown plugin Mobile
  }else{}
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* Start - Setup do countdown */
    if( typeof $.fn.countdown != "undefined"){
          try{
          $('.CountBF26').countdown('2019/12/26 23:59:59', function(event) {
              var totalHours = event.offset.totalDays * 24 + event.offset.hours;
              var totalDays = (Math.floor(totalHours / 24) - 1);
              $(this).html(event.strftime("%H:%M:%S"));
          });
          $('.CountBF27').countdown('2019/11/27 23:59:59', function(event) {
              var totalHours = event.offset.totalDays * 24 + event.offset.hours;
              var totalDays = (Math.floor(totalHours / 24) - 1);
              $(this).html(event.strftime("%H:%M:%S"));
          });
          $('.CountBF0112').countdown('2019/12/26 23:59:59', function(event) {
              var totalHours = event.offset.totalDays * 24 + event.offset.hours;
              var totalDays = (Math.floor(totalHours / 24) - 1);
              $(this).html(event.strftime("%H:%M:%S"));
          });
          $('.CountBF30').countdown('2019/11/30 23:59:59', function(event) {
              var totalHours = event.offset.totalDays * 24 + event.offset.hours;
              var totalDays = (Math.floor(totalHours / 24) - 1);
              $(this).html(event.strftime("%H:%M:%S"));
          });
       
          $('.ofertaRproximaCounter').countdown('2019/11/27 11:30:00', function(event) {
               var totalHours = event.offset.totalDays * 24 + event.offset.hours;
               var totalDays = (Math.floor(totalHours / 24) - 1);
               $(this).html(event.strftime("%H:%M:%S"));
          });
        }catch(e){}
         
    }
    /* End - Setup do countdown */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
}catch(e){}

// Universal Analytics

// Condição IF que executa o GA para Mobile
if (typeof MOBILE != 'undefined' && MOBILE) {
    (function(i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] || function() {
            (i[r].q = i[r].q || []).push(arguments)
        }, i[r].l = 1 * new Date();
        a = s.createElement(o),
            m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
    })

    // Executa script padrão para Analytics
    (window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

    // Informa a conta do GA (tracking code)

    try{    
	       var user_id = getCookie('responsysId');
            }catch(e){
               var user_id=null;
            }

    if(user_id && user_id.length>0)
    {
    sanitized_user_id = user_id;
    }
    else
    {
    sanitized_user_id = undefined;
    }

    ga('create', 'UA-24883739-1', 'auto','mobly2Tracker', {'cookieDomain': 'mobly.com.br', 'userId': sanitized_user_id});
  //  ga('mobly2Tracker.require', 'GTM-TP2PXV6');

    // Envia evento para o GA
    ga('mobly2Tracker.require', 'linkid', 'linkid.js'); //liberar in-page analytics
    ga('mobly2Tracker.require', 'displayfeatures');
    console.log('ga mobile debug');
    ga('mobly2Tracker.send', 'pageview');

   
    
}

// #email hash#
try{
$("input[name='NewsletterSignupForm\[email\]'],#email,#NewsletterFormPopUp_email,#LoginForm_email,#RegistrationForm_email,#loginForm #username").blur(
	function(){
		try{
		var vl=$(this).val(); 
		if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(vl)){
			setCookie('responsysId',md5(vl), 63072000000, '.mobly.com.br');
		};}catch(e){console.log(e)}
	}
);
}
catch(e)
{
//ignore
}

// End Universal Analytics


try{
    $(document).ready(function() {
        // $('.banner-televendas').dialog({width:650, height:509});
        if (window.location.hash == "#mobly-televendas") {
            $(".modal-telesales-phones").trigger("click");
        }
        if (window.location.search == "?mobly-televendas") {
            $(".modal-telesales-phones").trigger("click");
        }
        if (window.location.toString().match(/mobly-televendas/)) {
                $(".modal-telesales-phones").trigger("click");
        }

    });
}catch(e){}

/* Grok Hover 
try{
    $("#grokstyle-modal").append('<div class="buscapimg-hover"><i class="arrow-up"></i> <p>Experimente nossa <br/>busca por imagem</p></div>');
}catch(e){}*/

/* */
try {

	// chrome
	if(/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor)) {

		function _getCallerFile() {

	        var err = new Error();
	        var callerfile;
	        var currentfile;

	        Error.prepareStackTrace = function (err, stack) { return stack; };
	        currentfile = err.stack.shift().getFileName();

	        while (err.stack.length) {
	            callerfile = err.stack.shift().getFileName();
	            if(currentfile !== callerfile) return callerfile;
	        }

		    return currentfile;
		}

		var __cookieDescriptor = Object.getOwnPropertyDescriptor(Document.prototype, 'cookie') ||
	                 Object.getOwnPropertyDescriptor(HTMLDocument.prototype, 'cookie');


	    var __startCookies = document.cookie;
	    var __changedCookies = [];
	    var __countCookies = document.cookie.split(';').length;

		if (__cookieDescriptor && __cookieDescriptor.configurable) {
		    Object.defineProperty(document, 'cookie', {
		        get: function () {
		            return __cookieDescriptor.get.call(document);
		        },
		        set: function (val) {

		        	try{
						var countB = document.cookie.split(';').length;
		        		__changedCookies.push({'value':val,'caller':_getCallerFile()});


		        	}catch(__ex__){
		        		var countB=0;
		        	}

		            __cookieDescriptor.set.call(document, val);


		            try {
			            __countCookies = document.cookie.split(';').length;

			            fire = false;

			            var data = moblyTracking.dataKinesis || {};

			            if( (countB - __countCookies) > 3 ) {

			            	fire = true;
			            	data.type = 'cookieEvictionEvent';
							console.log('cookie eviction detected...');
							console.log('Sending cookie eviction event ');
			            }

			            if(/mobsessid/.test(val)){

			            	fire = true;
			            	data.type = 'cookieSessidOverideEvent';
							console.log('cookie sessid overide detected...');
							console.log('Sending cookie sessid overide event ');
			            }



			            if(fire){
			            	
			            	data.countBefore = countB;
			            	data.countAfter = __countCookies;
			            	data.currentTry =  val;
			            	data.startCookies =  __startCookies;
			            	data.changedCookies =  JSON.stringify(__changedCookies);
                                        data.agent =  window.navigator.userAgent;
			            	data.uri =  window.location.pathname + window.location.search;

			            	data = JSON.stringify(data);
			            	console.log('Sending cookie event : ');
			            	console.log(data);

							var firehose = new AWS.Firehose({
							                    accessKeyId: AWS_KEY,
							                    secretAccessKey: AWS_SECRET,
							                    region: AWS_REGION
							                });

			                var params = {
							    DeliveryStreamName: 'mobly-tis-front-events',
							    Record: {
							        Data: data + '\n'
							    	}
								};

							firehose.putRecord(params, function(err, data) {
								if (err) {
								  console.log('error sending event');
								  console.log( err );
								} else {
								  console.log('Event successfully sent');
								}
				          	});                
					    }
			            
			        } catch(____ez_____){}
		       	}
		    });
		}
	}

}catch(_______e){ }
/**/

$(document).ready(function(){
  $('li.outletH, li.outletH *').on('mouseenter', function(){
    $('li.outletH').addClass('active');
    $('.menu-overlay').css('display', 'block');
  });


  $('li.lancamentosH, li.lancamentosH *').on('mouseenter', function(){
    $('li.lancamentosH').addClass('active');
    $('.menu-overlay').css('display', 'block');
  });


  $('.menu-main.content-limits > ul > li').on('mouseenter', function(){
      $('.menu-main.content-limits > ul > li').each(function(){
        $(this).removeClass('active');
      });
      $(this).addClass('active');
      if(!$(this).hasClass('menuSubHover')){
        $('.menu-overlay').css('display', 'none');
      }
  })
});
try{
  if(typeof MOBILE != 'undefined' && MOBILE){
    //Start - Countdown plugin Mobile
    !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m<10&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),Math.abs(b)>1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b<0?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
        //End - Countdown plugin Mobile
  }else{}
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* Start - Setup do countdown */
    if( typeof $.fn.countdown != "undefined"){
          try{
          $('.crono-campanha').countdown('2019/12/05 23:59:59', function(event) {
            var totalHours = event.offset.totalDays * 24 + event.offset.hours;
            var totalDays = (Math.floor(totalHours * 24) - 1);
            $(this).html(event.strftime("%H:%M:%S"));
          });
          
        }catch(e){}
         
    }
    /* End - Setup do countdown */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
}catch(e){}
try {
    $(document).ready(function() {
        if ($(".dynamic_option_assembly_required").text() == "Sim, sugerimos a contratação do nosso serviço de montagem (para os CEPs em que o serviço está disponível) ou de algum profissional experiente de sua preferência") {
            $(".dynamic_option_assembly_required").html('Sim, sugerimos a contratação de um profissional ou do Serviço de Montagem Mobly (para os CEPs em que ele está disponível). <a href="javascript:void(0)" data-toggle="modal" data-target="#installationTermsModal" id="installationTerms">Saiba mais</a>.');
        }
    })
} catch(e) {}